package com.testclone;

/**
 * Created by yijy on 2017/9/8.
 */
public class User implements Cloneable {
    private String username;
    private int age;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", age=" + age +
                '}';
    }

    public User clone() throws CloneNotSupportedException {
        User userclone = (User) super.clone();
        return userclone;
    }
}
